package com.xyy.saas.payment.adpater.fumin.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: wuqiongda
 * @Date: 2019/11/7 20:36
 */
public class FuminConvertUtil {

    static Map<String, String> picMap = new HashMap<>();
    static Map<String, Integer> contactTypeMap = new HashMap<>();
    static Map<String , String> certTypeMap = new HashMap<>();
    static Map<String, String> jobTypeMap = new HashMap<>();
    static Map<String, String> relationshipMap = new HashMap<>();
    static Map<String, Integer> cardTypeMap = new HashMap<>();

    static {
        // key值参照PictureEnum code
        picMap.put("1", "201");
        picMap.put("2", "202");
        picMap.put("3", "203");
        picMap.put("4","101");
        picMap.put("5","102");
        // key值参照ContactEnum code
        contactTypeMap.put("1",1);
        contactTypeMap.put("2",2);
        contactTypeMap.put("3",3);
        contactTypeMap.put("4",4);
        contactTypeMap.put("5",5);
        //key值参照JobTypeEnum code
        jobTypeMap.put("1", "1");
        jobTypeMap.put("2", "2");
        jobTypeMap.put("3", "3");
        jobTypeMap.put("4", "4");
        jobTypeMap.put("5", "5");
        jobTypeMap.put("6", "8");
        //key值参照CertTypeEnum code
        certTypeMap.put("1", "01");
        certTypeMap.put("2","02");
        //key值参照RelationshipEnum code
        relationshipMap.put("1", "1");
        relationshipMap.put("2", "2");
        relationshipMap.put("3", "3");
        relationshipMap.put("4", "4");
        relationshipMap.put("5", "5");
        relationshipMap.put("6", "6");
        relationshipMap.put("7", "7");
        relationshipMap.put("8", "8");
        //key值参照BankCardEnum code
        cardTypeMap.put("1", 6);
        cardTypeMap.put("2", 7);
    }

    public static String getFuminPic(String picNo){
        return picMap.get(picNo);
    }

    public static Integer getContactType(String code){
        return contactTypeMap.get(code);
    }

    public static String getCertType(String code){
        return certTypeMap.get(code);
    }

    public static String getJobType(String code){
        return jobTypeMap.get(code);
    }

    public static String getRelationship(String code){
        return relationshipMap.get(code);
    }

    public static Integer getCardType(String code){
        return cardTypeMap.get(code);
    }
}
